'use strict';

function choose_no_repeat_number(collection) {
  for(let i=0;i<collection.length;i++){
    for(let j=i+1;j<collection.length;j++){
      if(collection[i]==collection[j]){
        collection.splice(j,1);
        j--;
      }
    }
  }
  console.log(collection);
  return collection;
}

module.exports = choose_no_repeat_number;
choose_no_repeat_number([1, 1, 1, 2, 2, 3, 4]);
